package main

import "fmt"

type Pupil struct {
	Name  string
	Age   int
	Score int
}

func (p *Pupil) ShowInfo() {
	fmt.Printf("名字 %v 年龄%v 成绩%v\n", p.Name, p.Age, p.Score)
}
func (p *Pupil) SetScore(score int) {
	p.Score = score
}
func (p *Pupil) testing() {
	fmt.Println("小学生正在考试中")
}

func main() {
	p := &Pupil{
		Name: "小学生",
	}
	p.testing()
	p.SetScore(100)
	p.ShowInfo()
	fmt.Println("ok")
}
